<include file="Public:header" />
<!--添加小区-->
<form id="info_form" action="{:U('RentalArea/add')}" method="post" enctype="multipart/form-data">
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">小区信息</li>
            <li>基础数据</li>
            <li>SEO设置</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="120">所属区域 :</th>
                        <td>
                            <select class="J_cate_select mr10" data-pid="0" data-menuid="1" data-uri="{:U('RentalCate/ajax_getchilds')}" data-selected=""></select>
                            <input type="hidden" name="area_id" id="J_cate_id" value="" />
                        </td>
                    </tr>

		            <tr>
						<th>小区名称 :</th>
						<td>
							<input type="text" name="title" id="J_title" class="input-text" size="40">
					        <!--input type="hidden" value="" name="color" id="J_color">
					        <a href="javascript:;" class="color_picker_btn"><img class="J_color_picker" data-it="J_title" data-ic="J_color" src="__IMG__/color.png"></a-->
		                </td>
					</tr>
                    <tr>
                        <th>物业类型 :</th>
                        <td>{:getLinkMenu(9,'property_type','radio')}</td>
                    </tr>
                    <!--tr>
                        <th>轨道交通 :</th>
                        <td>{:getLinkMenu(8,'jiaotong','radio')}</td>
                    </tr>
                    <tr>
                        <th>环线 :</th>
                        <td>{:getLinkMenu(7,'huanxian','radio')}</td>
                    </tr-->
                    <tr>
                        <th>建筑年代 :</th>
                        <td><input type="text" name="age" id="age" class="input-text" size="20"/></td>
                    </tr>
                    <tr>
                        <th>小区地址 :</th>
                        <td><input type="text" name="address" id="address" class="input-text" size="30"/> </td>
                    </tr>

                    <tr>
                        <th>小区图片 :</th>
                        <td><script id="uploadpic" name="uploadpic" type="text/plain"></script>
                           <input type="button" class="btn btn_submit" style="margin:0 0 10px 10px;" onclick="upImage();" value="选择图片">
                            <div id="imageList">
                                <ul class="list clearfix">
                                </ul>
                            </div>
                        <input type="hidden" name="file" id="file" />
                        </td>
                    </tr>

                    <tr>
                        <th>周边配套 :</th>
                        <td><textarea name="desc" id="desc" style="width:400px;height:50px;resize: none;"></textarea></td>
                    </tr>

					<tr>
						<th>{:L('publish')} :</th>
		 				<td>
		                	<label><input type="radio" name="status" class="radio_style" value="1" checked="checked"> {:L('yes')} </label>&nbsp;&nbsp;
							<label><input type="radio" name="status" class="radio_style" value="0" > {:L('no')}</label>
						</td>
					</tr>

				</table>
			</div>
            <div class="content_list pad_10 hidden">
                <table width="100%" cellspacing="0" class="table_form">

                    <tr>
                        <th>物业公司 :</th>
                        <td>
                            <input type="text" name="data[wycompany]" id="wycompany" class="input-text" size="30" value="" />
                        </td>
                    </tr>
                    <tr>
                        <th>开发商 :</th>
                        <td>
                            <input type="text" name="data[kfs]" id="kfs" class="input-text" size="30" value="" />
                        </td>
                    </tr>
                    <tr>
                        <th>其它配套 :</th>
                        <td>
                            <input type="text" name="data[pt]" id="pt" class="input-text" size="30" value="" />
                        </td>
                    </tr>
                    <tr>
                        <th>其它 :</th>
                        <td>
                            <table width="70%"  cellspacing="0" class="table_form">
                                <tr>
                                    <th width="120">建筑结构：</th>
                                    <td><input type="text" name="data[jiegou]" class="input-text" size="20" /></td>
                                    <th width="120">物业费：</th>
                                    <td><input type="text" name="data[wuyefee]" class="input-text" size="20" /></td>
                                    <th width="120">建筑面积：</th>
                                    <td><input type="text" name="data[jianzhu]" class="input-text" size="20" /></td>
                                </tr>

                                <tr>
                                    <th width="120">容积率：</th>
                                    <td><input type="text" name="data[rongji]" class="input-text" size="20" /></td>
                                    <th width="120">绿化率：</th>
                                    <td><input type="text" name="data[lvhua]" class="input-text" size="20" /></td>
                                    <th width="120">停车位：</th>
                                    <td><input type="text" name="data[chewei]" class="input-text" size="20" /></td>
                                </tr>
                                <tr>
                                   <th width="120">住宅类型：</th>
                                    <td><input type="text" name="data[zhuzhai]" class="input-text" size="20" /></td>
                                </tr>

                            </table>
                        </td>
                    </tr>
                </table>
          </div>
            <div class="content_list pad_10 hidden">
                <table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="120">{:L('seo_title')} :</th>
                        <td><input type="text" name="seo_title" id="seo_title" class="input-text" size="60"></td>
                    </tr>
                    <tr>
                        <th>{:L('seo_keys')} :</th>
                        <td><input type="text" name="seo_keys" id="seo_keys" class="input-text" size="60"></td>
                    </tr>
                    <tr>
                        <th>{:L('seo_desc')} :</th>
                        <td><textarea name="seo_desc" id="seo_desc" cols="80" rows="8"></textarea></td>
                    </tr>
                </table>
            </div>
            </div>
		<div class="mt10"><input type="submit" value="{:L('submit')}" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
</form>
<include file="Public:footer" />
<js file="__STATIC__/ueditor/ueditor.config.js" charset="utf-8" />
<js file="__STATIC__/ueditor/ueditor.all.min.js" charset="utf-8" />
<js file="__STATIC__/ueditor/lang/zh-cn/zh-cn.js" charset="utf-8" />
<script type="text/javascript">
    window.UEDITOR_HOME_URL='__STATIC__/ueditor/';
    window.onload=function(){
            upmoreimg();
        UE.getEditor('desc',{initialFrameWidth:880,initialFrameHeight:100,toolbars: [
           ['fullscreen', 'source', 'undo', 'redo', 'bold',"fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]
        ],autoFloatEnabled:false});

    }
</script>
<js file="__STATIC__/js/calendar/WdatePicker.js" charset="utf-8" />
<script type="text/javascript">
    var check_name_url = "{:U('RentalArea/ajaxCheckTitle')}";
    $(function(){
        $('ul.J_tabs').tabs('div.J_panes > div');
        $('.J_cate_select').cate_select('请选择');
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $("#J_title").formValidator({onshow:"请填写小区名称",onfocus:"请填写小区名称"}).inputValidator({min:1,onerror:"请填写小区名称"}).ajaxValidator({
            type : "get",
            url : check_name_url,
            datatype : "json",
            async:'false',
            success : function(result){
                if(result.status == 0){
                    return false;
                }else{
                    return true;
                }
            },
            buttons: $("#dosubmit"),
            onerror : "该小区已经存在",
            onwait : "正在验证"
        });
        $("#J_cate_id").formValidator({onshow:"请选择区域",onfocus:"请选择区域"}).regexValidator({regexp:"intege1",datatype:"enum",onerror:"请选择区域"});
        $(":radio[name^='property_type']").formValidator({onshow:"请选择物业类型",onfocus:"请选择物业类型"}).inputValidator({min:1,max:10,onerror:"请选择物业类型"});
        $("#age").formValidator({onshow:"请填写建筑年代如：2015",onfocus:"请填写建筑年代如：2015"}).inputValidator({min:1,onerror:"请填写建筑年代"}).regexValidator({regexp:"intege1",datatype:"enum",onerror:"年代只能为数字"});

    });

   </script>
<js file="__JS__/uploadImg.js" charset="utf-8" />
</body>
</html>